/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.mapper;

import cn.webrx.entity.UserLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>Project: ssmapp - UserLogMapper
 * <p>Powered by webrx On 2022-03-29 15:12:03
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */

@Service
public interface UserLogMapper {
    @Insert("insert into t_userlog(account,info,create_ip) value(#{account},#{info},#{ip})")
    public int insert(Map<String,String> map);

    @Select("select id,account,info,create_time ct,create_ip cip from t_userlog order by id desc")
    public List<UserLog> queryAll();

    @Select("select id,account,info,create_time ct,create_ip cip from t_userlog where account = #{account} order by id desc")
    public List<UserLog> query(String account);
}
